﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAO;
using DTO;

namespace BUS
{
    public class KhachHangBUS
    {
        KhachHangDAO khDAO = new KhachHangDAO();

        public List<KhachHangDTO> LayDanhSachKhachHang()
        {
            return khDAO.LayDanhSachKhachHang();
        }

        public KhachHangDTO LayThongTinKhachHangTheoMa(int ma)
        {
            KhachHangDTO dto = khDAO.LayThongTinKhachHangTheoMa(ma);
            return dto;
        }

        public string ThemKhachHang(KhachHangDTO kh)
        {
            return khDAO.ThemKhachHang(kh);
        }

        public string CapNhatKhachHang(KhachHangDTO kh)
        {
            return khDAO.CapNhatKhachHang(kh);
        }

        public string XoaKhachHang(KhachHangDTO kh)
        {
            return khDAO.XoaKhachHang(kh);
        }

        public List<KhachHangDTO> TimKiemKhachHang(string str)
        {
            return khDAO.TimKiemKhachHang(str);

        }
    }
}
